package com.example.designdemo.decorator;

public class Decorator implements Sourceable {
    private Source source;

    public Decorator(Source source){
        super();
        this.source = source;
    }

    @Override
    public void method() {
        System.out.println("添加的功能:"+"before decorator!");
        source.method();
        System.out.println("添加的功能:"+"after decorator!");
    }
}
